﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using DiscoveryLogic.Common.Utilities;

namespace DiscoveryLogic.Analytics.DataObjects
{
    public class DataFolder
    {
        public static string NetworkDataFolder
        {
            get
            {
                string appFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
                appFolderPath = Path.Combine(appFolderPath, "Network Data");
                if (!Directory.Exists(appFolderPath))
                    Directory.CreateDirectory(appFolderPath);
                return appFolderPath;
            }
        }

        public static string EntityDataSetFileExtension(EntityType entityType)
        {
            switch(entityType)
            {
                case EntityType.Grants:
                    return GrantSetFileExtension;
                case EntityType.Organizations:
                    return OrgFileExtension;
                case EntityType.Persons:
                    return PersonFileExtension;
                case EntityType.Publications:
                    return PubFileExtension;
                case EntityType.Document:
                    return DocFileExtension;
                case EntityType.Subject:
                    return SubjFileExtension;
            }
            return string.Empty;
        }

        public static string NetworkFileExtension = ".net";
        public static string NetworkClusterFileExtension = ".cluster";
        public static string NetworkVisualFileExtension = ".viz";
        public static string NetworkExclusionSettingFileExtension = ".ex";
        public static string NetworkInclusionSettingFileExtension = ".in";
        public static string NetworkDedupFileExtension = ".dedup";
        public static string RuleFileName = "Rules.rule";
        public static string GrantSetFileExtension = ".grants";
        public static string PersonFileExtension = ".persons";
        public static string OrgFileExtension = ".orgs";
        public static string PubFileExtension = ".pubs";
        public static string DocFileExtension = ".docs";
        public static string SubjFileExtension = ".subjs";
        public static string NetworkMeasureFileExtension=".NetMeasure";
    }
}
